﻿/*
 * @autor: hectorea
 * @date: 11/07/2012
 * @programming interview 1
 * 
 */
using System;

namespace StringReverse
{
    /// <summary>
    /// Programming Interview 1: Write a method that reverse a string.
    /// </summary>
    class Program
    {
        static void Main()
        {
            string input = string.Empty;

            do
            {
                Console.Clear();

                Console.Write("Type a string to reverse:");
                input = Console.ReadLine();

                string reversed = input.ReverseStringOptimized();
                Console.WriteLine("The reversed string is {0}",reversed);

                input = Console.ReadLine();

            } while ((input.ToLower() != "x"));
        }             
    }
}
